import dt from '@dt/dt'

const env = {
  dev: {
    dtUrl: 'http://172.16.1.126:8100',
    statsUrl: 'http://172.16.18.60:8798',
    h5Url: 'http://172.16.1.126:8080',
    env: 'dev'
  },
  test: {
    dtUrl: 'https://dtwgwtest.tospur.com',
    statsUrl: 'https://dtbitest.tospur.com',
    h5Url: 'https://dtwebtest.tospur.com',
    env: 'test'
  },
  test2: {
    dtUrl: 'https://dtgwt2.tospur.com',
    statsUrl: 'https://dtbit2.tospur.com',
    h5Url: 'https://dtwebt2.tospur.com',
    env: 'test'
  },
  uat: {
    dtUrl: 'https://dtgwuat-new.tospurfang.com',
    statsUrl: 'https://biuat-new.tospurfang.com',
    h5Url: 'https://dtwebuat-new.tospurfang.com',
    env: 'uat'
  },
  prod: {
    dtUrl: 'https://dtgw.tospurfang.com',
    statsUrl: 'https://bi.tospurfang.com',
    h5Url: 'https://dtweb.tospurfang.com',
    env: 'prod'
  }
}
// env.dev.h5Url = 'http://172.20.2.79:5173' //leo本地

// env.dev.dtUrl = 'http://172.20.7.229:8901'

let config = {
  id: 36,
  name: 'DT-Web',
  version: import.meta.env.VITE_BUILD_VERSION,
  buildTime: import.meta.env.VITE_BUILD_TIME,
  deviceType: 4,
  env: import.meta.env.VITE_ENV
}

if (import.meta.env.DEV) {
  Object.assign(dt.env, config, env.uat)
} else {
  Object.assign(dt.env, config, env[import.meta.env.VITE_ENV])
}
console.log(dt)
